/*
	Azid Engine is 3D Game Engine developed along side with Galactic Siege (see Google Code) 
	Copyright (C) 2010  Jorgen Ader

	This file is part of AzidEngine.

	AzidEngine is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.

	AzidEngine is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with AzidEngine.  If not, see <http://www.gnu.org/licenses/>. 
*/

#ifndef __EngineStateManager_HPP__
#define __EngineStateManager_HPP__

#include "Includes.hpp"
#include "EngineState.hpp"

namespace AzidEngine
{
	/**
	 * \addtogroup ENGINE
	 * @{
	 * \addtogroup MANAGERS
	 * @{
	 * \class StateManager
	 * @{
	 */

	class StateManager
	{
	private:
		struct StateInfo
		{
			Ogre::String StateName;
			EngineState * StatePtr;
		};
	public:
		StateManager();
		~StateManager();
		
		void onCurrentUpdate();
		bool setCurrentState(EngineState* state);
		void onDestroyCurrentState();
		void addState(EngineState* state);
		void removeState(EngineState* state);
	private:
		
		std::vector<StateInfo>		mStateList;
		StateInfo*	 				mCurrentStatePtr;
	};

	/**
	 * @}
	 * @}
	 * @}
	 */
}
#endif /* __EngineStateManager_HPP__ */
